Skip to content

Optimize proof memory#1097

Open
0xfornax wants to merge 4 commits intomasterfrom
optimize-proof-memory
Open

Optimize proof memory#1097
0xfornax wants to merge 4 commits intomasterfrom
optimize-proof-memory

Conversation

@0xfornax
Copy link
Copy Markdown
Member

@0xfornax 0xfornax commented May 6, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Coverage Report

@jshufro
Copy link
Copy Markdown
Contributor

jshufro commented May 6, 2026

Pretty smart. Does it work?

You can also consider vectorizing the function- right now we do this one validator index at a time, but there are node operators who have to generate multiple proofs per pass.

@0xfornax
Copy link
Copy Markdown
Member Author

0xfornax commented May 7, 2026

Pretty smart. Does it work?

It works!

You can also consider vectorizing the function- right now we do this one validator index at a time, but there are node operators who have to generate multiple proofs per pass.

The request I received was to optimize the memory footprint as some nodes were getting an OOM. Not sure if storing multiple proofs on a single pass would be an improvement on the memory issue.

Copy link
Copy Markdown
Contributor

@jshufro jshufro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manual 'release' of these byte buffers to the gc is a bit of an antipattern, see #1098 for an approach that removes the need.

Comment thread shared/types/eth2/fork/electra/state_electra.go
Comment thread shared/types/eth2/fork/fulu/state_fulu.go
Make memory improvements to state ssz parsing automatically
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Coverage Report

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Coverage Report

@0xfornax 0xfornax force-pushed the optimize-proof-memory branch from f09154b to c990cde Compare May 7, 2026 23:08
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Coverage Report

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/rocket-pool/smartnode/rocketpool/node 0.00% (ø)
github.com/rocket-pool/smartnode/shared/services 0.34% (+0.00%) 👍
github.com/rocket-pool/smartnode/shared/services/beacon 18.08% (ø)
github.com/rocket-pool/smartnode/shared/services/beacon/client 0.63% (+0.01%) 👍
github.com/rocket-pool/smartnode/shared/types/eth2 0.00% (ø)
github.com/rocket-pool/smartnode/shared/types/eth2/fork/electra 0.00% (ø)
github.com/rocket-pool/smartnode/shared/types/eth2/fork/fulu 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/rocket-pool/smartnode/rocketpool/node/stake-megapool-validator.go 0.00% (ø) 1415 0 1415
github.com/rocket-pool/smartnode/shared/services/beacon/client.go 17.65% (ø) 102 18 84
github.com/rocket-pool/smartnode/shared/services/beacon/client/std-http-client.go 0.00% (ø) 5622 (-68) 0 5622 (-68)
github.com/rocket-pool/smartnode/shared/services/megapools.go 1.02% (+0.00%) 5106 (-23) 52 5054 (-23) 👍
github.com/rocket-pool/smartnode/shared/types/eth2/fork/electra/state_electra.go 0.00% (ø) 1183 (-183) 0 1183 (-183)
github.com/rocket-pool/smartnode/shared/types/eth2/fork/fulu/state_fulu.go 0.00% (ø) 1296 (-181) 0 1296 (-181)
github.com/rocket-pool/smartnode/shared/types/eth2/types.go 0.00% (ø) 449 (+123) 0 449 (+123)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants